//
//  MusicView.m
//  海角音乐
//
//  Created by dllo on 15/8/10.
//  Copyright (c) 2015年 杨元石. All rights reserved.
//

#import "MusicView.h"

@implementation MusicView

- (void)dealloc
{
    [_collectionView release];
    [super dealloc];
}

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    
    if (self) {
        
        _flowLayout = [[UICollectionViewFlowLayout alloc] init];
        _flowLayout.itemSize = CGSizeMake(175*ADJUSTWIDTH, 120*ADJUSTWIDTH);
        _flowLayout.minimumLineSpacing = 10;
        _flowLayout.minimumInteritemSpacing = 1;
        _flowLayout.sectionInset = UIEdgeInsetsMake(15,6,5,6);
        self.collectionView = [[UICollectionView alloc]initWithFrame:CGRectMake(0, 64, SCREEN_WIDTH, SCREEN_HEIGHT) collectionViewLayout:_flowLayout];
        self.collectionView.backgroundColor = [UIColor clearColor];
        [self addSubview:_collectionView];
        [_collectionView release];
        [_flowLayout release];
        
    }
    
    return self;
  
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
